clear all;
clc;

% ----------------------- Importing Data ----------------------------------

noaxons = 200;
thdata = load('neg_sub_bp_dc_act_p1_d0p2_t0.txt');
thdata_Lbox = zeros(10,10);
thdata_Rbox = zeros(10,10);

thdata_Lbox(:) = -thdata(1:(noaxons/2),1);
thdata_Rbox(:) = -thdata((noaxons/2+1):noaxons,1);

% ----------------------- Plot Monpolar Case ------------------------------

t11_vertlv = {'T12','L1','L2','L3','L4','L5','S1','S2','S3','S4/5'};
t8_vertlv  = {'T9','T10/11','T12','L1','L2/3','L3/4','L5','S1/2','S2/3','S4/5'};

figure;
%subplot(1,2,1);
boxplot(thdata_Lbox,'labels',t8_vertlv);
ttl1 = 'Right Cord (Left Body)';
ttl2 = 'Intradural Bipolar Stimulation (Patient 1): Midline';
title(ttl2,'FontSize',30,'FontWeight','b');
ylabel('Stimulation Threshold Magnitudes (V)','FontSize',30); 
ylim([0,0.3]);
set(gca,'FontSize',24);
set(gca,'xtick',1:size(thdata_Lbox,2),'xticklabel',t8_vertlv,'FontSize',30);

return

subplot(1,2,2);
boxplot(thdata_Rbox,'labels',t8_vertlv);
title('Left Cord (Right Body)','FontSize',30,'FontWeight','b');
ylim([0,0.3]);
set(gca,'FontSize',24,'YTick',[]);
set(gca,'xtick',1:size(thdata_Lbox,2),'xticklabel',t8_vertlv,'FontSize',14);